package it;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class It {
    private String name;
    private int age;
    private String techDire;//technical direction
    private int year;
    private String unit;
    private String duty;

    public It(){}

    public It(String name,int age,String techDire,int year,String unit,String duty) {
        this.name = name;
        this.age = age;
        this.techDire = techDire;
        this.year = year;
        this.unit = unit;
        this.duty = duty;
    }

    public void outPut(It intr){
        System.out.println("信息如下"+"\n姓名："+getName()+"\n年龄："+getAge()+"\n技术方向："+getTechDire()+"\n工作年限："+getYear()+"\n工作单位："+getUnit()+"\n职务："+getDuty());
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return this.age;
    }

    public void setAge(int age) {
        if (age<15){
            System.out.println("年龄无效");
            this.age = 15;
        }
        else {
            this.age = age;
        }

    }

    public String getTechDire() {
        return this.techDire;
    }

    public void setTechDire(String techDire){
        this.techDire = techDire;
    }

    public int getYear() {
        return this.year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public String getUnit() {
        return this.unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getDuty() {
        return this.duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }
}
